<?php /* Smarty version 2.6.10, created on 2011-10-06 18:29:10
         compiled from bhavcopyListMcx.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'html_options', 'bhavcopyListMcx.tpl', 22, false),array('function', 'html_select_date', 'bhavcopyListMcx.tpl', 26, false),array('modifier', 'string_format', 'bhavcopyListMcx.tpl', 84, false),)), $this); ?>
<HTML>
<HEAD><TITLE>Tips Calculation !!!</TITLE>
</HEAD>
<BODY bgcolor="white">
<SCRIPT language="javascript">
<?php echo '
window.name = \'displayAll\';
function changeItem()
{
  document.form1.changedField.value = "itemId";
  document.form1.submit();
}
'; ?>

</SCRIPT>
<a href="index.php">Home</a>&nbsp;&nbsp;&nbsp;<a href="txtFile.php">Upload File MCX</a>&nbsp;&nbsp;&nbsp;	<a href="bhavCopyList.php">List MCX All</a>
<CENTER>
<FORM name="form1" method="POST" action="<?php echo $this->_tpl_vars['PHP_SELF']; ?>
">
<INPUT type="hidden" name="display" value="<?php echo $this->_tpl_vars['display']; ?>
">
<INPUT type="hidden" name="itemIdChanged" value="0">
  Exchange: 
    <SELECT name="exchange" value="MCX" onChange="document.form1.submit();">
    <?php echo smarty_function_html_options(array('selected' => ($this->_tpl_vars['selectedExchange']),'values' => ($this->_tpl_vars['exchangeValue']),'output' => ($this->_tpl_vars['exchangeValue'])), $this);?>

    </SELECT>

  From Date : 
    <?php echo smarty_function_html_select_date(array('time' => ($this->_tpl_vars['fromDate']),'prefix' => 'fromDate','start_year' => "-1",'end_year' => "+1",'month_format' => "%m",'field_order' => 'DMY','day_value_format' => "%02d"), $this);?>

  
  To Date : 
    <?php echo smarty_function_html_select_date(array('time' => ($this->_tpl_vars['toDate']),'prefix' => 'toDate','start_year' => "-1",'end_year' => "+1",'month_format' => "%m",'field_order' => 'DMY','day_value_format' => "%02d"), $this);?>

  
  Item :
    <SELECT name="itemId" onChange="document.form1.itemIdChanged.value=1;document.form1.submit();">
    <?php echo smarty_function_html_options(array('selected' => ($this->_tpl_vars['itemIdSelected']),'values' => ($this->_tpl_vars['itemIdValues']),'output' => ($this->_tpl_vars['itemIdOptions'])), $this);?>

    </SELECT>
  
  Expiry Date : 
    <SELECT name="expiryDate" onChange="document.form1.submit();"> 
    <?php echo smarty_function_html_options(array('selected' => ($this->_tpl_vars['expiryDateSelected']),'values' => ($this->_tpl_vars['expiryDateValues']),'output' => ($this->_tpl_vars['expiryDateOptions'])), $this);?>

   </SELECT>
   
  Sort By : 
    <SELECT name="sortBy" onChange="document.form1.submit();"> 
    <?php echo smarty_function_html_options(array('selected' => ($this->_tpl_vars['sortingSelected']),'values' => ($this->_tpl_vars['sortValuesArr']),'output' => ($this->_tpl_vars['sortOutputArr'])), $this);?>

   </SELECT>   
  
    <INPUT type="submit" name="submitBtn" value="Go" >
  </FORM>
  </CENTER>
  <TABLE border="1" cellSpacing="0" cellPadding="2" align="center" width="90%" style="font-weight: bold; font-size: 16px;">
    <TR bgcolor="pink">
        <TH NOWRAP><font color="blue">WeekDay</font></TH> 	 
        <?php if ($this->_tpl_vars['displayItemName'] == '1'): ?>
        	<TH NOWRAP><font color="blue">Item Name</font></TH> 	 
        	<TH NOWRAP><font color="blue">Expiry Date</font></TH> 	 
        <?php endif; ?>
        <TH NOWRAP><font color="blue">Date</font></TH> 	 
        <TH NOWRAP><font color="blue">Open</font></TH>
        <TH NOWRAP><font color="blue">High</font></TH>
        <TH NOWRAP><font color="blue">Low</font></TH>
      <TH NOWRAP><font color="blue">Close</font></TH>
      <TH align="right"><font color="blue">Lot Size</font></TD>
      <TH align="right"><font color="blue">OI Total</font></TD>
      <TH align="right"><font color="blue">OI Total In Lots</font></TD>
			<TH align="right">&nbsp;</TD>
			<TH align="right">&nbsp;</TD>
    </TR>   
  	<?php unset($this->_sections['display']);
$this->_sections['display']['name'] = 'display';
$this->_sections['display']['loop'] = is_array($_loop=$this->_tpl_vars['highPrice']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['display']['show'] = true;
$this->_sections['display']['max'] = $this->_sections['display']['loop'];
$this->_sections['display']['step'] = 1;
$this->_sections['display']['start'] = $this->_sections['display']['step'] > 0 ? 0 : $this->_sections['display']['loop']-1;
if ($this->_sections['display']['show']) {
    $this->_sections['display']['total'] = $this->_sections['display']['loop'];
    if ($this->_sections['display']['total'] == 0)
        $this->_sections['display']['show'] = false;
} else
    $this->_sections['display']['total'] = 0;
if ($this->_sections['display']['show']):

            for ($this->_sections['display']['index'] = $this->_sections['display']['start'], $this->_sections['display']['iteration'] = 1;
                 $this->_sections['display']['iteration'] <= $this->_sections['display']['total'];
                 $this->_sections['display']['index'] += $this->_sections['display']['step'], $this->_sections['display']['iteration']++):
$this->_sections['display']['rownum'] = $this->_sections['display']['iteration'];
$this->_sections['display']['index_prev'] = $this->_sections['display']['index'] - $this->_sections['display']['step'];
$this->_sections['display']['index_next'] = $this->_sections['display']['index'] + $this->_sections['display']['step'];
$this->_sections['display']['first']      = ($this->_sections['display']['iteration'] == 1);
$this->_sections['display']['last']       = ($this->_sections['display']['iteration'] == $this->_sections['display']['total']);
?>
  	  <?php if ($this->_tpl_vars['displayCurrentRow'][$this->_sections['display']['index']] == 'Y'): ?>
				<TR>
				<TD NOWRAP align="center"><?php echo $this->_tpl_vars['weekDay'][$this->_sections['display']['index']]; ?>
</TD> 	
				<?php if ($this->_tpl_vars['displayItemName'] == '1'): ?>
					<TD align="center"><?php echo $this->_tpl_vars['itemName'][$this->_sections['display']['index']]; ?>
</TD> 	 
					<TD NOWRAP align="center"><?php echo $this->_tpl_vars['expiryDateBc'][$this->_sections['display']['index']]; ?>
</TD> 	  	 
				<?php endif; ?>
				
				<TD NOWRAP align="center"><?php echo $this->_tpl_vars['bhavcopyDate'][$this->_sections['display']['index']]; ?>
</TD> 	
				<TD align="right"><?php echo $this->_tpl_vars['openPrice'][$this->_sections['display']['index']]; ?>
</TD>
				<TD align="right"><?php echo $this->_tpl_vars['highPrice'][$this->_sections['display']['index']]; ?>
</TD>
				<TD align="right"><?php echo $this->_tpl_vars['lowPrice'][$this->_sections['display']['index']]; ?>
</TD>
				<TD align="right"><?php echo $this->_tpl_vars['closePrice'][$this->_sections['display']['index']]; ?>
</TD>
				<TD align="right"><?php echo $this->_tpl_vars['lotSize'][$this->_sections['display']['index']]; ?>
</TD>
				<TD align="right"><?php echo $this->_tpl_vars['openInterestTot'][$this->_sections['display']['index']]; ?>
</TD>
				<?php if ($this->_tpl_vars['displayEndedContract'][$this->_sections['display']['index']] == 1): ?>
					<TD align="right"><?php echo ((is_array($_tmp=$this->_tpl_vars['openInterestInLotsTotPending'][$this->_sections['display']['index']])) ? $this->_run_mod_handler('string_format', true, $_tmp, "%.0f") : smarty_modifier_string_format($_tmp, "%.0f")); ?>
</TD>
					<TD align="right"><?php echo ((is_array($_tmp=$this->_tpl_vars['openInterestInLotsTot'][$this->_sections['display']['index']])) ? $this->_run_mod_handler('string_format', true, $_tmp, "%.0f") : smarty_modifier_string_format($_tmp, "%.0f")); ?>
</TD>
					<TD align="right"><?php echo ((is_array($_tmp=$this->_tpl_vars['endedOpenInterest'][$this->_sections['display']['index']])) ? $this->_run_mod_handler('string_format', true, $_tmp, "%.0f") : smarty_modifier_string_format($_tmp, "%.0f")); ?>
</TD>
				<?php else: ?>
					<TD align="right"><?php echo ((is_array($_tmp=$this->_tpl_vars['openInterestInLotsTot'][$this->_sections['display']['index']])) ? $this->_run_mod_handler('string_format', true, $_tmp, "%.0f") : smarty_modifier_string_format($_tmp, "%.0f")); ?>
</TD>
					<TD align="right">&nbsp;</TD>
					<TD align="right">&nbsp;</TD>
				<?php endif; ?>
				</TD>
				</TR>   
	    <?php endif; ?>
    <?php endfor; endif; ?>  
  </TABLE>
</BODY>
</HTML>